package interfaz.Intro;

import conexion.ManejadorConexion;
import javax.swing.JDialog;
import usoHAPSIE.HAPSIEApp;

/**
 *
 * @author Erika Berenice Hernández Angulo
 */
public class SeleccionEstandar extends javax.swing.JDialog {
    
    public JDialog menuPrincipal;
    
    /** Creates new form Seleccion */
    public SeleccionEstandar(java.awt.Frame parent) {
       super(parent);
       initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        EtiquetaSeleccion = new javax.swing.JLabel();
        BotonPAS220 = new javax.swing.JButton();
        BotonISO9001 = new javax.swing.JButton();
        BotonISO14001 = new javax.swing.JButton();
        BotonISO22000 = new javax.swing.JButton();
        BotonOHSAS18001 = new javax.swing.JButton();
        statusPanel = new javax.swing.JPanel();
        javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
        statusMessageLabel = new javax.swing.JLabel();
        statusAnimationLabel = new javax.swing.JLabel();
        progresoConexion = new javax.swing.JProgressBar();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Aspectos Generales - Selección de Estándar");
        addWindowListener(new java.awt.event.WindowAdapter() {
            public void windowClosing(java.awt.event.WindowEvent evt) {
                formWindowClosing(evt);
            }
        });

        EtiquetaSeleccion.setFont(new java.awt.Font("Arial", 1, 16)); // NOI18N
        EtiquetaSeleccion.setText("Seleccione el Estándar que desea evaluar: ");
        EtiquetaSeleccion.setName("EtiquetaSeleccion"); // NOI18N

        BotonPAS220.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        BotonPAS220.setIcon(new javax.swing.ImageIcon(getClass().getResource("/interfaz/resources/checkList.png"))); // NOI18N
        BotonPAS220.setText("       PAS 220");
        BotonPAS220.setName("BotonPAS220"); // NOI18N
        BotonPAS220.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotonPAS220ActionPerformed(evt);
            }
        });

        BotonISO9001.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        BotonISO9001.setIcon(new javax.swing.ImageIcon(getClass().getResource("/interfaz/resources/checkList.png"))); // NOI18N
        BotonISO9001.setText("       ISO 9001");
        BotonISO9001.setName("BotonISO9001"); // NOI18N
        BotonISO9001.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotonISO9001ActionPerformed(evt);
            }
        });

        BotonISO14001.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        BotonISO14001.setIcon(new javax.swing.ImageIcon(getClass().getResource("/interfaz/resources/checkList.png"))); // NOI18N
        BotonISO14001.setText("       ISO 14001");
        BotonISO14001.setName("BotonISO14001"); // NOI18N
        BotonISO14001.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotonISO14001ActionPerformed(evt);
            }
        });

        BotonISO22000.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        BotonISO22000.setIcon(new javax.swing.ImageIcon(getClass().getResource("/interfaz/resources/checkList.png"))); // NOI18N
        BotonISO22000.setText("       ISO 22000");
        BotonISO22000.setName("BotonISO22000"); // NOI18N
        BotonISO22000.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotonISO22000ActionPerformed(evt);
            }
        });

        BotonOHSAS18001.setFont(new java.awt.Font("Arial", 1, 18)); // NOI18N
        BotonOHSAS18001.setIcon(new javax.swing.ImageIcon(getClass().getResource("/interfaz/resources/checkList.png"))); // NOI18N
        BotonOHSAS18001.setText("      OHSAS 18001");
        BotonOHSAS18001.setName("BotonOHSAS18001"); // NOI18N
        BotonOHSAS18001.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                BotonOHSAS18001ActionPerformed(evt);
            }
        });

        statusPanel.setToolTipText("HAPSIE 1.0");
        statusPanel.setName("statusPanel"); // NOI18N

        statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N

        statusMessageLabel.setName("statusMessageLabel"); // NOI18N

        statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N

        progresoConexion.setName("progresoConexion"); // NOI18N

        javax.swing.GroupLayout statusPanelLayout = new javax.swing.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(statusPanelSeparator, javax.swing.GroupLayout.DEFAULT_SIZE, 512, Short.MAX_VALUE)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(statusMessageLabel)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 488, Short.MAX_VALUE)
                .addComponent(statusAnimationLabel)
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, statusPanelLayout.createSequentialGroup()
                .addContainerGap(350, Short.MAX_VALUE)
                .addComponent(progresoConexion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(statusPanelLayout.createSequentialGroup()
                .addComponent(statusPanelSeparator, javax.swing.GroupLayout.PREFERRED_SIZE, 2, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(statusPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(statusMessageLabel)
                        .addComponent(statusAnimationLabel))
                    .addComponent(progresoConexion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(3, 3, 3))
        );

        jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/interfaz/resources/NegotegiaIcono.png"))); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(427, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(statusPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGap(98, 98, 98)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(BotonPAS220, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE)
                    .addComponent(BotonISO9001, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE)
                    .addComponent(BotonISO14001, javax.swing.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE)
                    .addComponent(BotonISO22000, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE)
                    .addComponent(BotonOHSAS18001, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 297, Short.MAX_VALUE))
                .addGap(129, 129, 129))
            .addGroup(layout.createSequentialGroup()
                .addGap(87, 87, 87)
                .addComponent(EtiquetaSeleccion, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGap(110, 110, 110))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(21, 21, 21)
                .addComponent(EtiquetaSeleccion, javax.swing.GroupLayout.PREFERRED_SIZE, 33, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(BotonPAS220, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(BotonISO9001, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(BotonISO14001, javax.swing.GroupLayout.PREFERRED_SIZE, 64, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(BotonISO22000, javax.swing.GroupLayout.PREFERRED_SIZE, 63, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(BotonOHSAS18001, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 24, Short.MAX_VALUE)
                .addComponent(statusPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
   
private void formWindowClosing(java.awt.event.WindowEvent evt) {//GEN-FIRST:event_formWindowClosing
    System.exit(0);
}//GEN-LAST:event_formWindowClosing

private void BotonPAS220ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotonPAS220ActionPerformed
    HAPSIEApp.trabajarConAreas = true;
    HAPSIEApp.idEstandar = HAPSIEApp.ID_CATALOGO_PAS220;
    iniciaMenuPrincipal();
}//GEN-LAST:event_BotonPAS220ActionPerformed

private void BotonISO9001ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotonISO9001ActionPerformed
    HAPSIEApp.trabajarConAreas = false;
    HAPSIEApp.idEstandar = HAPSIEApp.ID_CATALOGO_ISO9001;
    iniciaMenuPrincipal();
}//GEN-LAST:event_BotonISO9001ActionPerformed

private void BotonISO14001ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotonISO14001ActionPerformed
    HAPSIEApp.trabajarConAreas = false;
    HAPSIEApp.idEstandar = HAPSIEApp.ID_CATALOGO_ISO14001;
    iniciaMenuPrincipal();
}//GEN-LAST:event_BotonISO14001ActionPerformed

private void BotonISO22000ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotonISO22000ActionPerformed
    HAPSIEApp.trabajarConAreas = false;
    HAPSIEApp.idEstandar = HAPSIEApp.ID_CATALOGO_ISO22000;
    iniciaMenuPrincipal();
}//GEN-LAST:event_BotonISO22000ActionPerformed

private void BotonOHSAS18001ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_BotonOHSAS18001ActionPerformed
    HAPSIEApp.trabajarConAreas = false;
    HAPSIEApp.idEstandar = HAPSIEApp.ID_CATALOGO_OHSAS18001;
    iniciaMenuPrincipal();
}//GEN-LAST:event_BotonOHSAS18001ActionPerformed

    public void iniciaMenuPrincipal() {
        HAPSIEApp.servicioConexion = new ManejadorConexion();
        menuPrincipal = new MenuPrincipal(this);
        setVisible(false);
        menuPrincipal.setLocationRelativeTo(this);
        menuPrincipal.setVisible(true);
    }
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton BotonISO14001;
    private javax.swing.JButton BotonISO22000;
    private javax.swing.JButton BotonISO9001;
    private javax.swing.JButton BotonOHSAS18001;
    private javax.swing.JButton BotonPAS220;
    private javax.swing.JLabel EtiquetaSeleccion;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JProgressBar progresoConexion;
    private javax.swing.JLabel statusAnimationLabel;
    private javax.swing.JLabel statusMessageLabel;
    private javax.swing.JPanel statusPanel;
    // End of variables declaration//GEN-END:variables
}
